package kr.co.mcshop.user;

import java.util.List;
import java.util.Map;

import kr.co.mcshop.user.UserMapper;

import org.apache.ibatis.session.SqlSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class UserService {
	
	@Autowired
	private SqlSession sqlSession;
	
	public List UserList(Map map){
		UserMapper mapper = sqlSession.getMapper(UserMapper.class);
		return mapper.UserList(map);
	}
	public int UserInsert(Map map){
		UserMapper mapper = sqlSession.getMapper(UserMapper.class);
		return mapper.UserInsert(map);
	}
	public int UserUpdate(Map map){
		UserMapper mapper = sqlSession.getMapper(UserMapper.class);
		return mapper.UserUpdate(map);
	}
	public int UserDelete(Map map){
		UserMapper mapper = sqlSession.getMapper(UserMapper.class);
		return mapper.UserDelete(map);
	}
	
	public User UserLogin(Map map){
		UserMapper mapper = sqlSession.getMapper(UserMapper.class);
		return mapper.UserLogin(map);
	}
}
